﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BussinessLogicTecnoPez.Produccion.Enfermedades_y_control_de_estanques;
using BussinessLogicTecnoPez.Produccion;
using BussinessLogicTecnoPez;
using Tecnopez.Globals;

public partial class Modules_EnfermedadesControlEstanque_Alertador : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.AddHeader("Refresh", "5;url=Alertador.aspx");

        Alerta res=null;
        string result="";
        string page="AlertadorPop.aspx";
        string name ="Alertas";
        int height=120;
        int width=200;


        if(Alerta.HayAlerta(out res))
        {
            this.Session["alertault"]=res;

            result += "window.open('" + page + "','" + name + "',";
            result += "'height=" + height.ToString() + ",width=" + width.ToString() + ",toolbar=no,directories=no,status=no,";
            result += "menubar=no,scrollbars=yes,resizable=no ,modal=yes, left=820, top=600');";
            
            //this.ClientScript.RegisterStartupScript(this.GetType(),"Alertar", 
            //        Functions.getScriptForOpenPopUpModalWindow("AletadorPop.aspx", "Alertas", 200, 99),true);

            this.ClientScript.RegisterStartupScript(this.GetType(), "window.open('AletadorPop.aspx')", result, true);
        }
    }
}
